{% extends "base/base.html" %}
{% block content %}

<script type="text/javascript">

   // Dates
   $(function() {

      //Date
      $("#date_from").datepicker({dateFormat: 'yy-mm-dd'});

      //Date
      $("#date_to").datepicker({dateFormat: 'yy-mm-dd'});

   });

</script>

<form method="POST" name="search" id="search" action="/search">
   {% csrf_token %}

<table class="top">

 <tr>
  <td colspan="2" style="text-align: left;">
   <p class="title">Search Incidents</p>
  </td>
  <td>

 <tr>
  <td colspan="2" height="25">
   <hr>
  </td>
 </tr>

 <tr>
  <td valign="top">
   <b>Date From*</b>
  </td>
  <td>
   <input type="text" class="input_date" name="date_from" id="date_from" value="{% if form.date_from.data %}{{form.date_from.data}}{% endif %}"/>
   {% if form.date_from.errors %}
   <p class="error">
   {% for error in form.date_from.errors %}{{error}}{% endfor %}
   </p>
   {% endif %}
  </td>
 </tr>

 <tr>
  <td colspan="2" height="15"></td>
 </tr>

 <tr>
  <td valign="top">
   <b>Date To*</b>
  </td>
  <td>
   <input type="text" class="input_date" name="date_to" id="date_to" value="{% if form.date_to.data %}{{form.date_to.data}}{% endif %}"/>
   {% if form.date_to.errors %}
   <p class="error">
   {% for error in form.date_to.errors %}{{error}}{% endfor %}
   </p>
   {% endif %}
  </td>
 </tr>

 <tr>
  <td colspan="2" height="15"></td>
 </tr>

 <tr>
  <td valign="top">
   <b>Status</b>
  </td>
  <td>
   <select class="search" name="status" id="status">
    <option value="">--</option>
    <option value="open">open</option>
    <option value="closed">closed</option>
   </select>
  </td>
 </tr>

 <tr>
  <td colspan="2" height="15"></td>
 </tr>

 <tr>
  <td valign="top">
   <b>Search Text</b>
  </td>
  <td>
   <input type="text" class="input_search" name="text" id="text" value=""/>
  </td>
 </tr>

 <tr>
  <td colspan="2" style="text-align: right;">
   <input type="submit" value="submit"/>
  </td>
 </tr>

</table>
</form>

{% endblock %}



